﻿using System;
using System.Web.UI.WebControls;

namespace TeamFranceTriple
{
    public partial class IFrameControl : BaseUserControl
    {
        public string Title { get; set; }
        public string Src { get; set; }
        public Unit Width { get; set; }
        public Unit Height { get; set; }

        protected void Page_Load(object sender, EventArgs e)
        {
            LegendLiteral.Text = this.Title;
            IFrameLiteral.Text = String.Format("<iframe id=\"iframe1\" runat=\"server\" src=\"{0}&width={1}\"" +
                            "frameborder=\"0\" scrolling=\"no\" width=\"{1}\" height=\"{2}\"></iframe>", this.Src, this.Width.Value, this.Height.Value);
        }
    }
}